
import request from "@/utils/request";
class RechargeAPI {
  /*     获取充值列表     */
  static getList (params) {
    return request({
      url: "/api/admin/deposits",
      method: "GET",
      params
    });
  }
  /*     获取    */
  static get (id) {
    return request({
      url: `/api/admin/deposits/${id}`,
      method: "GET",
    });
  }
  /*     修改    */
  static put (data) {
    return request({
      url: `/api/admin/deposits/${data.id}`,
      method: "PUT",
      data
    });
  }

  static complete (id) {
    return request({
      url: `/api/admin/deposits/${id}/complete`,
      method: "POST",
    });
  }
  static reject (id) {
    return request({
      url: `/api/admin/deposits/${id}/reject`,
      method: "POST",
    });
  }
  /*     导出export    */
  static exports (data) {
    return request({
      url: `/api/admin/deposits/export`,
      method: "POST",
      data
    });
  }
  /**
   * 设为成功
   *
   * @param id
   * @param data
   * @returns {*}
   */

  /*
  |--------------------------------------------------------------------------
  | 提示
  |--------------------------------------------------------------------------
  |
  | 手动确认充值成功，确认入款？
  |
  | 确认 取消
  */
  static approve (id, data) {
    return request({
      url: `/api/admin/deposits/${id}/approve`,
      method: "POST",
      data
    });
  }

  /**
   * 设为失败
   *
   * @param id
   * @param data
   * @returns {*}
   */

  /*
  |--------------------------------------------------------------------------
  | 提示
  |--------------------------------------------------------------------------
  |
  | 驳回充值订单，确认操作？
  |
  | 确认 取消
  */
  static deny (id, data) {
    return request({
      url: `/api/admin/deposits/${id}/deny`,
      method: "POST",
      data
    });
  }



}
export default RechargeAPI;